Skip to content

refactor(web): use semantic recurrence equality on open - #2742

Merged
cursor[bot] merged 4 commits into
mainfrom
cursor/semantic-recurrence-equality-dea2
Aug 10, 2026
Merged

refactor(web): use semantic recurrence equality on open#2742
cursor[bot] merged 4 commits into
mainfrom
cursor/semantic-recurrence-equality-dea2

Conversation

@tyler-dane

Copy link
Copy Markdown
Contributor

Summary

Replaces the #2739 RRULE string-normalization equality (INTERVAL=1 / WKST regex surgery) with a shared semantic compare of parsed recurrence options. Opening an occurrence of a Google-style series still stays preserve when only serialization drifts; real weekday/freq/interval/until edits still flip to series / single.

recurrenceRulesSemanticallyEqual lives next to patchGridDraftRecurrence and compares freq, interval (omitted = 1), order-insensitive byweekday, until, and count — not dtstart / schedule or library default wkst.

Simplicity

One helper used by both the useRecurrence mount effect (outer + inner guards) and adapter ruleUnchanged. Deleted normalizeRecurrenceRule and the inconsistent raw string compare. No new abstraction beyond that seam.

Automated validation

  • bun test:web on useRecurrence.test.ts + grid-event-draft.adapter.test.ts — 39 pass (keeps INTERVAL-omitted preserve + non-UTC UNTIL regressions; adds param-order / BYDAY-order / WKST drift + real weekday edit + adapter INTERVAL drift)
  • bun run lint — clean for changed files (pre-existing warnings elsewhere only)

Independent review

Pending fresh review after PR open.

Test plan

  • bun test:web packages/web/src/views/Forms/EventForm/DateControlsSection/RecurrenceSection/useRecurrence/useRecurrence.test.ts packages/web/src/events/grid-event-draft.adapter.test.ts
  • bun run lint
Open in Web Open in Cursor 

cursoragent and others added 3 commits August 10, 2026 20:15
Replace RRULE string surgery with parsed-options comparison so
serialization drift (INTERVAL=1, WKST, param/BYDAY order) no longer
flips preserve→series when opening an occurrence.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
Share sortedByweekday with the seed key, early-return unchanged
patches, and document the editable-field whitelist.

Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/semantic-recurrence-equality-dea2 branch from f2e8531 to 9e12f19 Compare August 10, 2026 20:15
@cursor
cursor Bot marked this pull request as ready for review August 10, 2026 20:23
Co-authored-by: Tyler Dane <tyler-dane@users.noreply.github.com>
@cursor
cursor Bot merged commit 29006f5 into main Aug 10, 2026
20 checks passed
@cursor
cursor Bot deleted the cursor/semantic-recurrence-equality-dea2 branch August 10, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants